using System;
using System.Collections.Generic;
using System.Text;

namespace BlackJackSimulator
    {

    public class CARD_VALUE
        {
        Random rnd;

        public CARD_VALUE()
            {
            rnd = new Random();
            }

        public string GetPlayerMatrixValueOfCard(CD_VALUE_TYPES CD_VAL_TYPE)
            {
            switch (CD_VAL_TYPE)
                {
                case CD_VALUE_TYPES.A:
                    return "A";
                    break;
                case CD_VALUE_TYPES.T:
                    return "T";
                    break;
                case CD_VALUE_TYPES.J:
                    return "T";
                    break;
                case CD_VALUE_TYPES.Q:
                    return "T";
                    break;
                case CD_VALUE_TYPES.K:
                    return "T";
                    break;
                case CD_VALUE_TYPES.Two:
                    return "2";
                    break;
                case CD_VALUE_TYPES.Three:
                    return "3";
                    break;
                case CD_VALUE_TYPES.Four:
                    return "4";
                    break;
                case CD_VALUE_TYPES.Five:
                    return "5";
                    break;
                case CD_VALUE_TYPES.Six:
                    return "6";
                    break;
                case CD_VALUE_TYPES.Seven:
                    return "7";
                    break;
                case CD_VALUE_TYPES.Eight:
                    return "8";
                    break;
                case CD_VALUE_TYPES.Nine:
                    return "9";
                    break;
                case CD_VALUE_TYPES.NOTHING:
                    return "0";
                    break;
                default:
                    return "0";
                    break;

                }
            }
        public int GetValueofCD(CD_VALUE_TYPES CD_VAL_TYPE)
            {
            switch (CD_VAL_TYPE)
                {
                case CD_VALUE_TYPES.A:
                    return 1;
                    break;
                case CD_VALUE_TYPES.T:
                    return 10;
                    break;
                case CD_VALUE_TYPES.J:
                    return 10;
                    break;
                case CD_VALUE_TYPES.Q:
                    return 10;
                    break;
                case CD_VALUE_TYPES.K:
                    return 10;
                    break;
                case CD_VALUE_TYPES.Two:
                    return 2;
                    break;
                case CD_VALUE_TYPES.Three:
                    return 3;
                    break;
                case CD_VALUE_TYPES.Four:
                    return 4;
                    break;
                case CD_VALUE_TYPES.Five:
                    return 5;
                    break;
                case CD_VALUE_TYPES.Six:
                    return 6;
                    break;
                case CD_VALUE_TYPES.Seven:
                    return 7;
                    break;
                case CD_VALUE_TYPES.Eight:
                    return 8;
                    break;
                case CD_VALUE_TYPES.Nine:
                    return 9;
                    break;
                case CD_VALUE_TYPES.NOTHING:
                    return 0;
                    break;
                default:
                    return 0;
                    break;
                }


            }
        public CD_VALUE_TYPES GetValueType(int ValueTypeID)
            {
            switch (ValueTypeID)
                {
                case 1:
                    return CD_VALUE_TYPES.A;
                case 2:
                    return CD_VALUE_TYPES.Two;
                case 3:
                    return CD_VALUE_TYPES.Three;
                case 4:
                    return CD_VALUE_TYPES.Four;
                case 5:
                    return CD_VALUE_TYPES.Five;
                case 6:
                    return CD_VALUE_TYPES.Six;
                case 7:
                    return CD_VALUE_TYPES.Seven;
                case 8:
                    return CD_VALUE_TYPES.Eight;
                case 9:
                    return CD_VALUE_TYPES.Nine;
                case 10:
                    return CD_VALUE_TYPES.T;
                case 11:
                    return CD_VALUE_TYPES.J;
                case 12:
                    return CD_VALUE_TYPES.Q;
                case 13:
                    return CD_VALUE_TYPES.K;

                default:
                    return CD_VALUE_TYPES.NOTHING;
                    break;
                }

            
            }
        public enum CD_VALUE_TYPES
            {

            A = 1,
            T = 10,
            J = 11,
            Q = 12,
            K = 13,
            Two = 2,
            Three = 3,
            Four = 4,
            Five = 5,
            Six = 6,
            Seven = 7,
            Eight = 8,
            Nine = 9,
            NOTHING=0

            }
        }
    }
